﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using EstateTrackerObjects;
using EstateTrackerObjects.Collections;

namespace Beronis_Estate_Tracker
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            listBox1.DisplayMember = "Name";
            listBox1.ValueMember = "ID";
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            Players p = new EstateTrackerObjects.Collections.Players();  
            p.Load();
            try
            {
                listBox1.DataSource = p.ToList();
                
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message,ex.GetType().ToString());
            }

            
            
        }
    }
}
